import request from '@/config/axios'
import type { GuestFeature } from './types'

export const getGuestFeaturesListApi = (params: any): Promise<IResponse> => {
  return request.get({ url: '/guest-features', params })
}

export const createGuestFeaturesApi = (data: Partial<GuestFeature>): Promise<IResponse> => {
  return request.post({ url: '/guest-features', data })
}

export const updateGuestFeaturesApi = (
  id: string,
  data: Partial<GuestFeature>
): Promise<IResponse> => {
  return request.put({ url: `/guest-features/id/${id}`, data })
}

export const getGuestFeaturesDetailApi = (id: string): Promise<IResponse<GuestFeature>> => {
  return request.get({ url: `/guest-features/id/${id}` })
}

export const delGuestFeaturesListApi = (ids: string[] | number[]): Promise<IResponse> => {
  return request.delete({ url: `/guest-features/id/${ids[0]}` })
}
